package cz.myslivec.slovicka.xml.action;

import java.io.InputStream;
import java.io.Serializable;

import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;

import cz.myslivec.slovicka.xml.ExportImportProcessor;

@Name("exportImportAction")
@Scope(ScopeType.CONVERSATION)
public class ExportImportAction implements Serializable {
	private static final long serialVersionUID = 6677010705345544260L;

	@In
	ExportImportProcessor exportImportProcessor;
	
	private InputStream uploadedData;
	
	
	public void exportDB() {
		exportImportProcessor.exportDB();
	}
	
	public void importDB() {
		exportImportProcessor.importDB(uploadedData);
	}
	
	// GETTERS & SETTERS
	public InputStream getUploadedData() {
		return uploadedData;
	}

	public void setUploadedData(InputStream uploadedData) {
		this.uploadedData = uploadedData;
	}
}
